package com.e.takeaway.util;

import java.util.concurrent.Executors;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

public class MyRetrofit {
    private final static Retrofit retrofit = initRetrofit();

    private static Retrofit initRetrofit (){
        Retrofit.Builder builder = new Retrofit.Builder();
        builder.baseUrl("http://81.68.223.150:8081/").addConverterFactory(GsonConverterFactory.create());
        builder.callbackExecutor(Executors.newSingleThreadExecutor());
        Retrofit retrofit = builder.build();
        return retrofit;
    }

    public static Retrofit getRetrofit(){
        return retrofit;
    }
}
